Search Results: "jewel"

7 September 2011

Gunnar Wolf: Language designers, API designers, PHP and utter fails

After many years of successfully dodging doing any serious programming in PHP, I had to get my feet wet with PHP for my RL job: I was requested to develop a simple but non-trivial module for our Institute's Drupal-based webpage. It basically meant two and a half weeks devoted to head-scratching: I had read the very good John van Dyk's Pro Drupal Development book, and knew it would be an important resource were I to face writing a module or work on a theme beyond the most basic stuff So I checked it out of the library, and started basically writing something similar to my good and trusty Perl code. After all, PHP seems quite similar to Perl, although forcing you to write more for no gain (i.e. requiring an array() declaration whenever you want to store more than one value together) or lacking important and useful constructs (not having a sane way to prepare a SQL statement for multiple executions with different parameters Yes, there are DB access methods that do provide it, but Drupal 6 does not use them). Anyway, book in hand, I started understanding while implementing (which is way different than just reading the book, right?) Drupal's notions. I cannot say I like them, but it's ahem doable. Now, I hit a problem twice. I chose to ignore it the first time, as it was a corner case I'd look into later on, but had to devote for hours of my attention later on. When designing the menu (which for Drupal means not only the facility which prepares/displays links to the bits of functionality, but also the access control layer and the action dispatcher a huge yay! for responsability separation!), I had only two access levels: Public and administrator. So, this seemed like a good fit:
  1. $public = array('first/action', 'second/action',
  2. 'third/action', 'something/else');
  3. foreach (array_keys($items) as $item)
  4. if (array_search($item, $public))
  5. $items[$item]['access callback'] = TRUE
  6. else
  7. $items[$item]['access arguments'] = array('diradmin');
But... No matter what I did, the first element in $public refused to be publicly visible. It was not until after a severe amount of head-scratching I came across this jewel in the PHP online manual:
Warning This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE, such as 0 or "". Please read the section on Booleans for more information. Use the === operator for testing the return value of this function.
GRAH. Using a sane language for some time had made me forget about the problems of true/false sharing space with other meaningful values. So, yes, checking for inclusion of a value in an array in PHP this way should be compared with class-bound identity (that's what === means) to FALSE, or better yet, using a function that exclusively returns a boolean (as in_array()). Anyway While arrays (which in PHP are any kind of list, be it keyed as a hash or consecutive as a traditional array) are such an usual construct in any language, please do take a look at PHP's array-handling API. Too long. Too complex. Too many corner cases. I cannot but wonder what keeps PHP as a popular language. It hurts.

9 May 2011

Gunnar Wolf: A different demonstration. What will it mean?

Today we had a very interesting demonstration. People who know me for some time know I like to be a part of demonstrations, adding my voice to the people. And even though I know most demonstrations, as massive as they might be, have no real and tangible effect... Well, I try to be there. Today we had a large demonstration in Mexico City of people angry with the government's tactics on the war on drugs Have you been to Mexico before 2007? You will remember we have always had our problems, but violence was basically limited to keeping an eye open, not flashing your money/jewels, and not looking too touristy. We were, all in all, a quiet country Known even as "the country where nothing happens, even if it happens". Five years later, a good portion of the country lives really in war-like conditions, and close to 45,000 people have been killed. At some point about a year ago (where the body count was at ~22,000), our oh-so-bright de-facto president said that "only" 10% of them were civilians. If that is still the case, and if proportions are held, we can now talk about ~4,500 people killed just because they were there Oh, but remember the country is not at war, and death penalty has very long been abolished, so we cannot give the other 90% a different status. We have had over 45,000 killed people. That means at least ~200,000 torn lifes. About six weeks ago, the cry from a father who lost his son started getting heard. And no, I do not want to talk about specific names or anything like that It is just the voice-bearer of many people who are fed up. Four days ago, he and a group of people left Cuernavaca city on a caravan and walked to Mexico city. Yesterday evening they arrived to the National University (UNAM), and were greeted by an amazing open-air concert: Mozart's Requiem. Today, our day started very early. My mother wanted to help, as many more anonymous citizens did, so we started making and packing sandwiches and apples at ~5:30AM, delivered them to the camp where they were staying and grouping with other people, and came back home for our breakfast. Later, at around 9AM, as the demonstration started going by our house (we live a block from UNAM), my girlfriend, father and me started walking with them. Why do I say this was a different demonstration than others I have been to?
  1. Much longer. We walked for close to 16Km, for about five hours. Most demonstrations I have been part of are 3-5Km long
  2. A different kind of support. I was surprised, even laughed at first when I saw a lady standing by us with a sign that read, I cannot join you today, but I'm there in spirit . But then I saw more, more people that just went out of their houses to a point close to where we walked on, and just stayed there on the streets. Not walking, yes, but being part of it.
  3. The march was silent And yes, this is the first time I see it for true. At the very beginning we heard some people chanting, cheering, but the cheerers were requested not to be noisy. People wearing political parties' logos were requested not to wear them (as political parties are at an all-time low prestige). No, we were not silent for the whole 5 hours; we were talking with each other, but it felt... just very different from any other times.
  4. Not only were people supporting, but this is the first time I saw this amount of people wanting to materially help. As I said, my mother delivered a little breakfast for 50 people, for those that slept at the camp, for those that had already walked ~70Km. But all along the road we were offered oranges, cookies, water, bread... Whatever people were able to offer, to somehow help. Very nice feeling of solidarity.
  5. Contrary to all other times, we were really spread out, it was a very low density walk, os it was quite pleasant. Of course, I have not even seen an estimation of the number of participants... And I doubt anyboy can be decently close to it
Will this change anything? I doubt it. I am happy that for the first time, the de-facto president (remember a large percentage of Mexicans still believe he lost the presidential election, and it was only due to his lack of legitimacy that he pushed the army to the streets to start this war on drugs) is recognizing that this might not be the best strategy but it is the only one he has... People are still, despite what I saw many felt, very far from organized. And, yes, no short-term concrete proposals are made on how to stop the killing I feel the population agrees that drugs should be legalized and regulated, that would at least shift the problem, reduce the direct violence (and money) related to it... But, of course, it is plainly not feasible with our current reality. Anyway, after a 5hr walk today (and even after a nice nap and shower), I don't want to dig into hypotheses anymore. I just wanted to share about a very interesting and different experience I had the opportunity to be part of.

20 February 2011

Joey Hess: the fate of the orphans

(Non-Debian readers can stop reading now, I'm talking about so-called "orphaned packages" and not anything of real-world importance.) In 2008 I stopped maintaining non-native packages in Debian. At the time I maintained a fair amount of stuff. It's interesting to see what happened to it after I gave it up, partly because some of the results seem so random and partly because some of what has happened seems to point at weaknesses in Debian. First, the success stories. More than half of my packages are now being maintained by others: xaos, longrun, fbreader, liblinebreak, analog, xgalaga, znc, sysnews, metastore, bsdgames, uqm, oneko, kobodeluxe, archivemail, unclutter I still use much of this stuff, some only occasionally, and other daily, and am glad it's being kept alive. (It's surprising that someone still care about longrun.) I was unhappy to have to NMU procmeter3 just before the release of Debian 6.0 to fix a trivial to debug RC bug that almost got it removed from the release. I hope that was just a bump in its road. Also, splitvt is now maintained again after being orphaned a long time. I'm not sure if it makes sense to keep it in Debian, since screen can do the same thing, and it has a security history, but someone wants to, so that's fine. Two packages are left on life support. I'm surprised nobody wants to maintain grepmail, unless we're all using notmuch or mairix now? And dgen is the best Sega emulator I know of. Several games were not picked up by the games team, despite them showing some interest originally, and were removed: xtris, xjewel, xemeraldia, xbl Of those, xemeraldia in particular is a lot of fun, I'm surprised nobody cared to keep it. Also, the nestra Nintendo emulator was shipped with squeeze, but now is removed as it never got a maintainer. I don't know if there is a better NES emulator in Debian. The intercal programming language was removed. Surprising. Debian does at least still have clc-intercal for all our pressing Intercal needs. Finally, sparkline-php was removed today despite never having had any bugs, needing no maintenance, and being a suggests of ikiwiki, which is now more buggy (broken relationships, outdated docs) and less featureful in Debian.

4 August 2010

Jaldhar Vyas: Sita Sings the Blues

In the evening today (Tuesday), the Debconf organizers arranged for a screening of the Creative Commons licensed film "Sita Sings the Blues" by Nina Paley. I went to see it as I had missed it when it was first released among tales of trials and tribulation at the hands of copyright meanies. So first let me say yay Free Culture!, boo Intellectual Property! etc. etc. Now we have that out of the way... "Sita Sings the Blues" has two main narrative threads: The breakup of Ninas relationship with her boyfriend and the Ramayana particularly a story from the uttarakanda about how after Shri Rama returned from Lanka, Sita had to undergo the agnipravesha to prove her chastity and even after she passed that test was eventually banished to the forest. I had an adverse reaction to this film. In fact I stayed to the end to be polite but I left afterwards as soon as I could. I had almost a physical feeling of nausea and I was surprised by this. Since then I have been pondering why this is so. It's not that its blasphemous. Shri Rama is not just a "perfect man", he is God (an avatar of Vishnu Bhagavan as is briefly touched upon in the film) for millions of people so, well, yes it is blasphemous but its more Rowan Atkinson style rather than Norwegian Black Metal style blasphemy. One never gets the impression that the author hates Hinduism or Indian culture the opposite in fact. And in fact it is not uncommon in our culture to speak of Sita and Rama in this way. They are not remote authority figures but as familiar to us as our own friends and family and the Ramayana is not just about events that happened long ago it is relevant to our lives right now. Even the "good woman done wrong by big dumb male jerk" narrative is not unknown. (See the Uttararamacharita of Bhavabhuti for instance.) though I would suggest reducing the Ramayana this way is akin to treating the Hitchhikers Guide to the Galaxy as a book about towels. Even the milder criticism that it is not accurate is offbase because although the Sanskrit poem by Maharshi Valmiki is the canonical rendition of the Ramayana, there are other well-known versions. Not just in Sanskrit, the Hindi retelling by Sant Tulsidas called Ramacharitamanasa is more popular than Valmiki. Also speaking as someone who has preached Ramakatha "professionally" I can tell you that even the priests do not stick to the letter of the text. It is encouraged and expected that they will riff on the basic stories adding or removing details according to the needs and taste of the audience. And the device of the three narrators made me smile as this is exactly the kind of discussions that go on after hearing the Ramakatha. (I must say Paley picked a notably illiterate trio though.) One place where this fell flat was when they discussed the alleged discrepancy between Sita living simply in the forest and dropping a trail of jewellery on the way to Lanka. Although I can imagine someone at some point saying, "Do not question these stories" not at this point. Even the most retarded westernized Indian would know that removing ones ornaments is a sign of widowhood. A married woman would only do that in extremis certainly not just merely because she was a hermit. In a few cases some extra details might have helped the story. It was not explained that Ravana does not just have rakshasas in his command but he is one himself. (And he certainly wasn't a good guy until one day he got up and kidnapped Sita.) Shri Ramas brother Lakshamana accompanied the couple into the forest to Lanka and back but he only pops up (for no apparent reason) at the end. But look at me, I'm turning into one of those people who rant about Star Trek continuity errors or complain that the Romans in a gladiator movie have the wrong helmets for that time period etc. One has to cut a storyteller some slack and I entered the screening determined to be charitable. It's also not because I don't really see much connection between the two stories. Getting dumped by someone who simply loses interest in you hardly seems equivalent to being trapped by a moral code that doesn't allow for individuals feelings. Paley could have easily made "Princess Leia Sings the Blues" and it wouldn't have changed the significance much. But in India people make far more tenuous connections between the epics and events in their own life so one can hardly complain about that. Aesthetics are not the problem either. The first version of the Ramayana I ever read was the Amar Chitra Katha comicbook version which partly influenced the visual style of this film. (In fact you briefly see it in one scene when different editions of the Ramayana flash by.) Hindu popular culture is very gaudy. (See Ramanand Sagars '80s Ramayana Hindi TV serial, which was very reverential, insanely popular and tacky beyond belief.) The animation in this film is very good and quite artistic. "So Jaldhar", you might be asking if you've read this far, "what exactly is your problem with this film?" I have read the Valmiki Ramayana in Sanskrit with the commentaries from beginning to end. I've read other Ramayanas in Sanskrit, Gujarati, and English. I have read the comicbook, I've read anti-Ramayana polemics. When you learn Sanskrit in the traditional way the first lesson, in the declension of masculine gendered nouns ending in vowels is rAma.h rAmau rAmA.h ... I am well aware there are different emphases, different interpretations in various versions. Why can't I accept this as just another take on a story that has shown its fluidity over and over again? It's just...wrong on a subrational level. How can I put this? Imagine you are flipping through the TV channels and you see your grandparents amongst Lady Gaga's backup dancers. Or you came home one night to find everything that was on the floor meticulously glued to the ceiling. Over the course of my life (to hear my mother tell it my first exposure to the Ramayana was before I could speak.) I have developed a mental bond with this story a certain idea of how it should be. I think so has Nina Paley. And this is the problem. "Sita Sings the Blues" is Nina Paleys Ramayana not mine.

29 March 2010

John Goerzen: Trip part 6: Prague

Note: this post written on March 20-21 and posted after our return. IMG_2895
(two women looking into the crypt at St. George s Basilica) We ve had a good couple of days in Prague. The city definitely feels more, well, foreign than Germany and that is perhaps accentuated by the fact that I don t know any Czech at all, while I know some basic German. It s been slow going at times, and surprisingly easy at others. Despite my lack of knowledge of Czech, I d say communicating here has been roughly as easy as in Germany. That is perhaps partially due to the fact that, of the places where we ve needed to communicate, we are either making simple requests (buying bread at a bakery) or the people we re talking to know some basic English. (Or, in one case, a guard at a museum at the Prague Castle complex used German to ask me to check a bag at the coat check, mildly surprising me and confusing Terah when I started to comply with instructions she didn t understand, and didn t know how I did.) The very first time we had a situation where it was a bit difficult to communicate, in the bakery, I got into my difficult to communicate mode and accidentally slipped in a couple of German words. Oops. Terah was laughing at me later, and commented that the store owner might have also been laughing at me or perhaps at his employee that also accidentally slipped into basic German mode. On Friday, we visited Vy ehrad Castle, the one that nobody that visits Prague seems to know about. That is perhaps because the palace/castle part of the complex has been mostly destroyed (but we did know that before going there.) It is in a nice, quiet, and beautiful park, and has the beautiful and old Basilica of Saints Peter and Paul, as well as a large ornate cemetery. Then we visited two iconic Prague places: V clavsk n m st (Wenceslas Square) and Starom stsk n m st (Old Town Square). Both were beautiful. And, unfortunately, also packed with tourists and made-in-China plastic trinket shops. There I got my first clue that large tour groups tend to have a detrimental effect on any free site in Prague. They come in, the guides yell, they clog up things, and also generally miss the sites of true interest because buying tickets to them makes the price of the tour uncompetitive. On Saturday, we took the tram out to Pra sk hrad (Prague Castle) the one that everybody knows about. We got there at about 8:15, and although the grounds are open, most of the buildings weren t open until 9. As a result, we had 45 minutes almost to ourselves in the nearly-empty castle complex. We could walk around on the giant squares, take some photos, and generally enjoy a crisp and quiet morning. IMG_2771 At 9, it was still pretty empty and we went into the ticket offices to buy our tickets. By the time we got out a few minutes later, it was packed mostly due to the arrival of innumerable tour groups from all over Europe and, apparently, Japan. We went to the Star kr lovsk pal c (Old Royal Palace) first, since I knew from their website that it would close at noon due to a visit from Prince Charles. That was a beautiful building, and it s amazing to read about the features of it that are centuries old or even almost a thousand years old. The Vladislavsk s l (Vladislav Hall) and chapel particularly caught my eye. Underneath the palace is a museum, including some 1000-year-old jewelry and flooring, and some clothing that is several hundred years old recoverd from burial plots. IMG_2775
(Vladislav Hall) Next, we went to the iconic (and free) Katedr la svat ho V ta (St. Vitus Cathedral). Our audioguides fortunately allowed us to bypass the long line, and we could step inside at a side door. That was one of many times in Europe I stepped inside a building, and suddenly came to a stop with a wow . That building is every bit as much impressive as it is made out to be, even crowded as it was. IMG_2839 We also went to Bazilika Sv. Ji (St. George s Basilica), which one of the guides described as ancient . It was another wow moment, and it felt like the oldest church we were in yet. I think it probably was, actually; last rebuilt in 1142. IMG_2874 For lunch, we asked for a recommendation from our hotel. They suggested one place, which we walked to. It was a nice easy walk down some Prague side streets, but the restaurant and all the others along our walk were closed on Saturday. We eventually made our way back to the hotel and asked for a new recommendation, which was successful this time. Terah ordered some ribs, while I ordered a more traditional Czech goulash, which happened to be served in a bread bowl. A minute later, the waiter brought Terah a fork and knife. And he brought me a bowl of water with a slice of lemon, and announced wash for you. That was a surprise, and a bit puzzling one at that. Turns out that eating bread that had stew served in it is indeed a bit messy, and having some water to clean up with is indeed helpful. We met up with Anna from Leipzig and one of her Czech friends for dinner Saturday night. We found a nice local Czech place. I had ham with sauerkraut in a folded potato cake. It was excellent, and the total bill for Terah and me came to 235 Kc or about $12.50. We had a nice walk back to the hotel in the crisp, dark evening. Sunday morning we had breakfast at our hotel the only time we ate a meal at a hotel this whole trip then got on the tram, the metro, and the bus to the airport. Total cost for that trip for two: 52 Kc, or about $2.75. Far cheaper than a taxi. One weird thing happened to us in Prague. We were riding the tram towards downtown, and as we would be on it for several stops, Terah was sitting. I was standing as there wasn t an available seat for me. Terah and I were both looking out windows, until Terah was startled because her arm was wet. She looked around and it turned out a middle-aged woman had spit on her, and was glaring at her. We never did figure out why. About all we can think of is maybe someone else, such as a very old person, had gotten aboard but Terah hadn t noticed and therefore didn t offer to give up her seat. That was probably the only real rude gesture towards us on the entire trip. We ran the story by Anna s friend (the native Czech) and she was as surprised and baffled as we were. As I wrap this up, we re sitting at our gate in Prague waiting for our flight to Munich. In this airport, in an out of the way corner on the very lowest floor, I spotted only the second drinking fountain I ve seen in Europe this entire time and also perhaps the continent s most expensive cup of coffee. After we get to Munich, it s a flight to Chicago, another to Indianapolis, and finally a drive home Monday.

29 December 2009

Neil Williams: Intermittent tasks

Sometimes, the main task at any one time is simply going to take time and cannot be shortened. With my poor network connection, this tends to occur any time I need to do network tasks like multistrap and debootstrap tests, archive updates and the rest. The problem is that my network connection is so bad, most apt type tasks completely saturate all available bandwidth, especially when downloading a single large package like those built from gcc or OOo.

Thankfully, gpdftext has provided an intermittent task that is useful, intermittent, non-network dependent and relatively straightforward (so as not to be too distracting from the main task) without being sufficiently routine to make me think about automating it.
I've downloaded some 70 public domain novels as A4 PDF and I'm gradually working through them in gpdftext to tidy up the chapter headings and reformat as an A5 PDF, ready to be transferred back to my ebook reader.

This version of gpdftext isn't released yet (it's current SVN, 0.1.0) as it's in string freeze. However, it provides a fairly robust test of the next release. :-)

Current list includes: Little Women, Fairy Tales of Hans Christian Andersen, Lady Susan, Northanger Abbey, Pride and Prejudice, Sense and Sensibility, Peter Pan (Peter and Wendy), Lorna Doone: A Romance Of Exmoor, The Gap in the Curtain, The Thirty-Nine Steps, Through the Looking Glass (And What Alice Found There), Fanny Hill: Memoirs of a Woman of Pleasure, Moll Flanders, Robinson Crusoe, The Further Adventures of Robinson Crusoe, A Tale of Two Cities, David Copperfield, Great Expectations, Little Dorrit, Oliver Twist, The Life And Adventures Of Nicholas Nickleby, The Adventures of Sherlock Holmes, The Casebook of Sherlock Holmes, The Hound of the Baskervilles, The Memoirs of Sherlock Holmes, The Return of Sherlock Holmes, Cranford, The Wind in the Willows, King Solomon's Mines, Tess of the d'Urbervilles, The Hunchback of Notre Dame, Declaration of Independence, Just so Stories, Kim, The Jungle Book, The Man Who Would be King, The Arabian Nights, Lady Chatterley's Lover, Sons and Lovers, Women in Love, The Story of Doctor Dolittle, The Call of the Wild, The Game, White Fang, Moby Dick, Anne of Green Gables, The Well at the World's End, Pygmalion, An Inquiry into the Nature and Causes of the Wealth of Nations, East is West, Strange Case of Dr Jekyll and Mr Hyde, The Jewel of Seven Stars, Anna Karenina, The Adventures of Huckleberry Finn, The Adventures of Tom Sawyer, The Kama Sutra, 20,000 Leagues Under the Sea, The Aeneid of Virgil.

That should be enough for now.... (21 converted so far).

5 June 2009

Joachim Breitner: Third place in AI programming contest

My contribution to the programming contest held by the German FreiesMagazin got a third place out of 13 submissions. This is quite good, considering that I only wrote a small wrapper around the generic game-tree Haskell library by Colin Adams, and hardly gave any serious thought into the problem.All entires are available for download. I have annotated the table containing the results with the line count as given by ohcount:
W D L Points Language Code lines
1. Kroschinsky 904 242 54 2954 Python 589
2. Schulz 858 263 79 2837 Python 544
3. Breitner 837 281 82 2792 Haskell 264
4. Jackermeier 754 306 140 2568 Perl 183
5. Roth 574 338 288 2060 C++ 1731
6. Eitel 567 355 278 2056 Ruby 352
7. Reichel 342 328 530 1354 Python 266
8. Zimmermann 303 400 497 1309 Java 1070
9. Apensiv 190 353 657 923 Perl 410
10. Maraun 150 300 750 750 C++ 690
11. Golemo 131 319 750 712 Python 104
12. Ziegelwanger 120 337 743 697 C++ 868
13. Fuest 32 254 914 350 Python 645
Note that the line count for my haskell program includes the game-tree library, which I bundled in my submission. Without it, it s 156 lines of code I had to write, which is second best in the code golf category.If you look at the timing statistics, you will see that my program took the longest. When the contest was started, the timelimit was one minute per round which I of course tried to use as much as possibly, by increasing the search tree depth. Later into the contest, the rules were changed to limit it to one minute for a whole game, and that long-running programs will get points deducted. I did some minor changes based on a profiling run, but did otherwise not care too much about performance. I would have tried to improve the runtime by using Haskell s good ability for parallelization. But when I asked on what kind of machine the code will be run, but they would not tell me. They said that this is a hobby programmer s contest where allowing for parallelization were not fair, so I did not work in that direction.All in all it was a positive experience, showing of Haskell s qualities as a language that you can quickly get good results with.

17 May 2009

Gunnar Wolf: Politicians time once again

It is time for stupid, empty politicians slogans once again in my dear country. And, as always, while we had lively, controversial presidential elections three years ago (and I won't rant this time on why so many Mexicans still believe the current president can only be called a de facto president), the mid-term elections... Fail to get any attention and cause only bored reactions. I am writing today mostly because I stumbled upon Francisco's post on why the Mexican Ecologist Green Party (PVEM) campaign does not impress him. As many, many other people with strong political opinions I know, I will go to the voting booth next July 5th, as I have done every time since I was of age - But I will most probably void my ballot, as I have found nobody worth my vote. And even if I am (and have always been) a leftist person, none of the four so-called leftist parties inspire the smallest bit of confidence. But hell, even the rightist or centrist parties fail to inspire confidence to their voters - After the 2006 electoral fiasco, we got a political system nobody believes in. And all analysts seem to concur that we moved from the most complete presidential regime to an utter partidocracy, where all of the (strong enough) parties cover each other's back not to lose the respective privileges (largely, money, but also law-making faculties and influence, which of course translates to impunity). Worth a very special mention is the crown jewel of political clowns in Mexico - PVEM, the Mexican Ecologist Green Party. A party that gets the gold medal for the most corrupt in our country (which is no small feat). A party where the National Party Presidents to date have only been father and son. And it is alarming because it is the only party apparently gathering more voters than they had before. But also, because of its utter pragmatism and lack of respect for anything they might once have stood for. I still remember on the 1994 elections, the first time they participated in general elections, their slogan was don't vote for a politician Vote for an ecologist... Little did the society know by then they were worse off than our oft-hated politicians. Can you imagine a so-called ecologist party that is expelled of the Global Greens as its behaviour is completely antithetical to anything a green party stands for? A party that promotes reinstating the death penalty (which was abolished from our Constitution, after decades of not being applied, less than a decade ago)? Or they say that, if a given medicine is not available at the Social Security hospitals, the government should pay the citizen so he can go and buy it at a drug store? (of course, if a needed medicine is not available at the Social Security it is most probably because the government is underfunded, not because the lazy administrators don't want to buy the medicines. And yes, with those two retrograde, stupid and -thankfully- completely unfeasible promises they have doubled their probable voters outcome in the past couple of months. The campaigns are only officially starting now. They are all really pathetic. A voter turnout of ~30% is expected. But yes, I am a politized person and just cannot help inviting everybody who has the right to go and vote. If there is somebody worth voting for in your district, please vote for him/her. However... Together with many people I admire, together with many of my friends, together with the people who still believe it is possible to make something out of this forsaken country's politic system... I invite you to void your ballots. Hopefully they will be enough so they must be heard this time.

3 April 2009

Joachim Breitner: Bejeweled AI in Haskell

The German online magazine FreiesMagazin has started a programming contest yesterday. The task is to write an AI for a two-player bejeweled-like game, where the stones that you can match cause your opponent to lose live points.This evening I thought that this would be a nice finger exercise in Haskell programming, and indeed it was. Most time was spent writing the code that communicates with the game supervisor (via text files) and that re-implements the game logic to simulate the next steps. The example code is in C++, so I had to do it again, but it s rather short: 123 lines, consisting of 8 lines for the module header, 26 lines for the data definitions, 16 lines for in- and output and 73 lines for the actual rules of the game.Writing the rest was really easy. 15 lines use a generic Haskell module to implement alpha-beta-search in Strategy.hs, and 6 lines of code to glue it all together. And I m sure one can do better...The program wins against the demo AI. By choosing other algorithms provided by game-tree might even improve that. Feel free to try it out!My code is available in a darcs repository (browse) under the GPL2 or later and I invite everyone to use it as a base for contest entries. If you want to use Haskell, you can just replace the Strategy.hs and do not have to re-implement the game logic. If you submit such a program, just make sure you credit me appropriately. Also, as always, patches are welcome. If the code is too slow for your taste, you can decrease the depth parameter in Strategy.hs.

10 November 2008

Benjamin Mako Hill: Wikimedia and GFDL 1.3

I spent more time than I would like to admit massaging the process that ultimately led to the release of the the GNU Free Documentation License 1.3 (GFDL) by the Free Software Foundation (FSF). Hours counted, it was probably one of my biggest personal projects this year. The effect is to allow wikis under the GFDL to migrate to the Creative Commons BY-SA license or, as Wikimedia's Erik M ller has proposed, to some sort of dual-license arrangement. There are many reasons for this change but the most important is that the move reduces very real barriers to collaboration between wikis and free culture projects due to license compatibility. BY-SA has become the GPL of the free culture world and Wikimedia wikis were basically locked out from sharing with a larger community, and vice-versa; projects will no longer have to choose between sharing with Wikipedia and sharing with essentially everyone else. The GFDL has done a wonderful job of helping get Wikimedia projects to where they are today and M ller's proposed switch seems, in my opinion, the best option to continue that work going forward. The FSF gets a lot of credit (and a lot of flack) for what it does. Offering to "let go" of Wikipedia -- without question the crown jewel of the free culture world -- represents a real relinquishing of a type of political control and power for the FSF. Doing so was not done lightly. But giving communities the choice to increase compatibility and collaboration by switching to a fundamentally similar license was and is, in my opinion, the right thing to do. Everyone who has worked hard to make this happen deserves the free culture movement's thanks. This list includes Richard Stallman, Brett Smith and Peter Brown of the FSF; James Vasile and Eben Moglen of the SFLC; Erik M ller, Mike Godwin and Shunling Chen of the Wikimedia Foundation. The FSF in general, and RMS in particular, deserves a huge amount of credit for what it has decided to not do in this case and for giving up control in a way that was responsible and accountable to its principles and to GFDL authors and in the interest of free culture movement more generally. It has not been easy or quick. If you support or appreciate work like this, please support the FSF and express this while doing so. Doing so is an important way to support these essential and almost inherently underappreciated efforts.

24 July 2008

David Moreno Garza: July 24th, 1958

Today, fifty years ago, my mother was born.

On July 24th, 1958, Vicenta Leyva gave birth to Olga Cristina Garza Leyva in the small town of Zumpango del R o (later renamed to Eduardo Neri), in the southern Mexican state of Guerrero. Her father Guillermo Garza, who is still alive, was a private pilot. Olga Cristina was named Cristina after the saint that is celebrated on the same day.

She was their third kid, a couple of years before V ctor and Guillermo were born and a couple of years after, Carlos was born, all of them being born on total different places on southern and central Mexico. The father, being a pilot, was absent from home for long periods, he even had "another family" somewhere in northern Mexico, supposedly in Sinaloa.

In the early 60s, the family moved to Mexico City where they were going to spend most of their life. They lived on a small apartment on Col. Moctezuma, which was (and still is) a working class neighborhood, just besides the Mexico City International Airport, on the eastern part of the city. Back in the days, it used to take quite some time to travel from there to any point of the city, like the downtown area or beyond.

All the kids spent most of their childhood there attending public schools. They weren't a wealthy family who couldn't even afford to buy and have meat on some days but only in special ocassions.

As the years passed and the kids became adults, Olga met David Moreno Rojas in the same neighborhood. He was enrolled at the National Autonomous University of Mexico, under Enterprises Administration in Ciudad Universitaria. He was also an avid f tbol player. He was named David after his father, David Moreno Gonz lez. They became boyfriend and girlfriend and got married when she was 20 and he was 24 years old on December 19th, 1978. They lived together for a few years in Col. Del Valle in central Mexico City.

Ten months later they were married, Lorena Moreno Garza, their first kid, was born on October 7th, 1979. S The family then moved to the suburb in Aragon, Estado de M xico. They had their second child on August 8th, 1984, named David Moreno Garza, becoming David III.

After the 1985 Mexico City massive earthquake, the family wanted to move outside the city and found relocation in Ciudad del Carmen, on the Mexican state of Campeche, located on the shore of the Gulf of Mexico, on 1988. They spent three or four years there and then moved to Celaya, Guanajuato where most of the father's family was located. They spent about five years there and then, for family reasons, they returned to Mexico City in 1995 to attend the family business.

Olga and her family had a good, loving family by then and had decided to not have any more kids. They had both of their children on private schools and taught them catholicism. On 1998, Vicenta passed away after a quick period of time because of liver cancer. This shocked most of the family.

As the years passed, the family business was sold and Olga stopped working, as she used to in the business. But as she had always been very active, she started working as a seller for a fine jewelry firm where she keeps working currently. Her husband, after pursuing his dream of going back to school and studying Law, works as a private work-related issues lawyer.

Olga is the most loving, nursing, affective, meticulous, scrupulous person I've ever met and even though I have only met her for almost twenty-four of her fifty years now, I admire her and love her as much as I have no words to describe. She is the one that built my sensitive, loving side where my heart resides, and I thank God for giving me such a great life gift and having her at any time.

mama.jpg

Today, her husband is 54, her daughter is 28, her son is 23 and she is 50 now. This is also an special year because she and her husband will celebrate 30 years of their marriage.

mamaypapa.jpg
Felicidades, jefecita.

19 July 2008

Amaya Rodrigo: Reiser was guilty after all

I know it is old news, but I did not have time to blog lately. This actually broke my heart.

Hans Reiser Leads Police to Nina's Body: last month Reiser was attempting to negotiate a deal for a 15-to-life sentence instead of 25-to-life if he produced his wife s body.

She was identified through dental records, clothing and jewelry, authorities said. Reiser knew exactly where the body was, his lawyer said.

I have no time to investigate this any further, but I suspect that the abuse from Reiser towards Debian was very close to the time of their divorce.

RIP, Nina.

25 June 2008

Gunnar Wolf: Firefox suckyness

I have to agree with Wouter regarding Firefox Iceweasel 3's suckyness. It might be a superior product in many fronts (I prefer it overall to its predecesor), but were it not for the usefulness of its many available extensions (most notably Web Developer, which has become an integral part of my everyday life), I'd have jumped ship for basically any other browser.
I'm just... adding an <AOL>ME TOO!</AOL> on Wouter's comments... WTF, just go to about:config...

So... Are you telling me that Firefox (even if it were the original, Mozilla-blessed version) has a warranty? No? Didn't think so... Go to about:license. You will see the very familiar and expected:
7. Disclaimer of warranty
Covered code is provided under this license on an "as is" basis, without warranty of any kind, either expressed or implied, including, without limitation, warranties that the covered code is free of defects (...)
Other than this downright stupid issue (which by and large goes against the regular Free Software culture), my main gripe is the number of active regions in the location-entry boxes - Yes, I can jump straight to the search box with Ctrl-K and to the location bar with Ctrl-L, but if I happen to try to move between them with good ol' Tab, why must it be inconsistent?
What do I mean? Go to the search field, press Tab. As expected, you are in the Location entry. Now, press Shift-Tab. For 5 points, where are you now? Bzzzt, no, you are not back where you began - You are in a stupid button which looks like your favicon giving you the identity information about the page you are looking at.
Having this button is a great idea - but why does it have to sit in the way of my tabulation? Were it because, in an inspired moment, the Firefox interface designers decided that buttons should be keyboard-accessible, I'd be most happy (it is by far my most mouse-intensive application, and I hate that... But it's just a button embedded in what should be a clean text-entry box.
And for that matter, it is not even a consistent button - Shift-tabbing from the search field will not get you to the search engine selector. And no key combination will lead you to the noisy (and also, mutually inconsistent) iconic buttons at the far right of both fields... Which, again, have no reason to be inside a text entry field!
Oh, and I found another pretty little jewel: Go to any site which has a self-signed SSL certificate. Of course, Firefox will go to great lengths to make sure you understand how unsafe is it for you to trust anybody who didn't pay big bucks to Verisign... But this is enough reason for me to send a bug report:

I am connecting through a crypted HTTPS connection. The site is providing identity information - not certified, right, but it does provide something. And the connection is crypted. Firefox/Iceweasel 2 showed me the URL in a light-yellow background showing the connection was secure - Now it just denies penta.debconf.org the right to call itself secure.
(Yes, I am not an interface designer... But it seems neither are they)
[update]Bug filed. Any comments will be welcome in Bugzilla. The bug with the Debconf site (and I do regard it as a bug) is that Iceweasel displays that Your connection to this web site is not encrypted because some of the elements (i.e. the CSS, images..) are sent in the clear - Even though the real information is crypted. Ever heard of data/visualization decoupling?

26 April 2008

Theodore Ts'o: Donald Knuth: I trust my family jewels only to Linux

Andrew Binstock interviewed Donald Knuth recently, and one of the more amusing tidbits was this:
I currently use Ubuntu Linux, on a standalone laptop it has no Internet connection. I occasionally carry flash memory drives between this machine and the Macs that I use for network surfing and graphics; but I trust my family jewels only to Linux.
More seriously, I found his comments about about multi-core computers to be very interesting:
I might as well flame a bit about my personal unhappiness with the current trend toward multicore architecture. To me, it looks more or less like the hardware designers have run out of ideas, and that they re trying to pass the blame for the future demise of Moore s Law to the software writers by giving us machines that work faster only on a few key benchmarks! I won t be surprised at all if the whole multithreading idea turns out to be a flop, worse than the “Itanium” approach that was supposed to be so terrific until it turned out that the wished-for compilers were basically impossible to write. Let me put it this way: During the past 50 years, I ve written well over a thousand programs, many of which have substantial size. I can t think of even five of those programs that would have been enhanced noticeably by parallelism or multithreading. Surely, for example, multiple processors are no help to TeX…. I know that important applications for parallelism exist rendering graphics, breaking codes, scanning images, simulating physical and biological processes, etc. But all these applications require dedicated code and special-purpose techniques, which will need to be changed substantially every few years.
This is a very interesting issue, because it raises the question of what next-generation CPU’s need to do in order to be successful. Given that it is no longer possible to just double the clock frequency every 18 months, should CPU architects just start doubling the number of cores every 18 months instead? Or should they try to concentrate a lot more computing power into an individual core, and optimize for a fast and dense interconnect between the CPU’s? The latter is much more difficult, and the advantage of doing the first is that it’s really easy for marketing types to use some cheesy benchmark such as SPECint to help sell the chip, but then people find out that it’s not very useful in real life. Why? Because programmers have proven that they have a huge amount of trouble writing programs that take advantage of these very large multicore computers. Ultimately, I suspect that we will need a radically different way of programming in order to take advantage of these systems, and perhaps a totally new programming language before we will be able to use them. Professor Knuth is highly dubious that the later approach will work, and while I hope he’s wrong (since I suspect the hardware designers are starting to run out of ideas, so it’s time software engineers started doing some innovating), he’s a pretty smart guy, and he may well be right. Of course, another question is whether what would we do with all of that computing power? Whatever happened to the predictions that computers would be able to support voice or visual recognition? And of course, what about the power and cooling issues for these super-high-powered chips? All I can say is, the next couple of years is going to be interesting, as we try to sort out all of these issues.

9 December 2007

Evan Prodromou: 18 Frimaire CCXVI

Chris Messina wrote an interesting post on his blog about his OpenID Shitlist, Hitlist and Wishlist for 2008. (I'm going to briefly try to remember if using the word "shit" is cause for alarm on Planet Debian, and then I'm going to ignore the problem and move on.) I think it's a good post and it really identifies some of the key players that are helping and failing in the OpenID space. I got a shout-out for Wikitravel and for the MediaWiki OpenID extension, which yay for me. I think Chris was probably a little unfair about Wikimedia's lack of support. The site is moving very slowly towards a unified login for all its wikis, which is a really difficult task to make happen. OpenID is slated for installation some time after that, so it's going to be a while. But I hope that it will be useful for Wikipedians. My main impression from this blog post, however, is that OpenID's day in the sun might be over. That's not a bad thing -- usually the hard work gets done after the cameras are turned off. Zealots like myself tend to think that if only the world knew about our latest-greatest idea or technology, they'd fall right into line and adopt it immediately. But my experience has been that things work a lot slower than that, and I'd guess that OpenID is probably going to have a similar adoption curve. In thinking about opening up the Social Web, it's probably good to compare the opening of the Web Web in the mid-1990s. At the time, most Americans who were "online" were subscribed to a proprietary network like AOL, Compuserve, Delphi or MSN. (I'm not sure how things were in the rest of the world... Similar? Worse?) Many of these services either walled their users from the Internet entirely, or made it a one-way interaction. AOLers could read stuff from the rest of the Web, for example, but others couldn't see what AOL folks were doing. That system looked impenetrable; after all, AOL was paying millions of dollars to make great content and manage forums and the like, and why would they give that away to Internet leeches for free? But eventually it came apart because the Web became more interesting than the on-line services. (I personally think the watershed was the Ate my balls meme, but others might differ. I just kind of picture hundreds of thousands of AOLers calling up technical support asking to see the Mr. T pictures, and that's what finally broke things down.) Today, on-line service "walled gardens" are a negligible part of the on-line world -- those that still exist are more or less big ISPs. I think that the parallel with the Social Web is probably pretty apt. Today, Google, Facebook and Digg are reluctant to open up their identity silos to a distributed social Web. Their main asset today is their collection of identities and the relationships between them -- why give away the crown jewels? My guess is that it's not going to be until a mature, standardized and distributed Social Web exists outside the walls of the big social-networking players that we'll see them really willing to sit down at the table and come to the party. Of course, by that time, it'll be a moot point. But that just means there's a nice big fat market for somebody smart to take advantage of. tags:

24 September 2007

Romain Francoise: Echoes and other releases

PopMatters reviews the new Foo Fighters album:
This leads, inevitably, to the question I ve persistently pondered while listening to Echoes. Who exactly is this record for? Who does Grohl expect to buy and/or like the thing?
Hmm. One for the fans?

In unrelated news, Vic Chesnutt's North Star Deserter (reviewed here) is a jewel, and Gravenhurst's The Western Lands is refreshingly rockier than its predecessors. Get them both.

23 July 2007

Evan Prodromou: 3 Thermidor CCXV

My brother Ted and his partner Nabil had a great commitment ceremony yesterday afternoon in Dolores Park in San Francisco. It was a beautiful day, and they had lots of friends who came out for them. I came up from Los Altos Hills with our parents, and my brothers Nate and Andy came with their friends and/or families, too. Ted and Nabil march to a different drummer, to put it mildly. Their ceremony was remarkably like a Quaker wedding, although I don't think they planned it that way. They had a nice picnic and tea party in the park for a few hours, let the guests get to know each other, and then called everyone together to listen to their promises to each other. (Very sweet, by the way). They then exchanged bejewelled carabiners -- those funky little mountain-climbing metal loops that people also use as keyrings. "We may lose necklaces or rings, but we're not going to lose our keys." The carabiners were decorated with the California state gem, benitoite (Benito-ite), which is rarer than diamonds. Brilliantly, their friends who designed the carabiners also managed to include a USB thumbdrive, on which they're going to copy all the pictures, stories, movies, and other digital paraphernalia from the ceremony itself. Ted and Nabil will be carrying around those pictures as long as they have the carabiners. Clever! After they'd exchanged the carabiners, they hooked them to their belts, and then hooked them together. "And now... we're HITCHED!" Thunderous applause. They then invited up anyone who wanted to make a toast. My brother Nate went first, and girt in a bastard sword (for unclear reasons), he made a great toast. A dozen other people, including my Dad, came up to speak. By then, Ted and Nabil were falling over with fatigue, so we had mercy on them and stopped coming up to say nice things about them. Everyone dug in to champagne and cake, and Amita June and her two cousins Elena and Tessa ran around on the huge playground in the park. Definitely a good, good wedding-like event. tags:

Long day This morning we had a Skype conference call relatively early in the morning, and then a brunch with Nabil's family (who are visiting from Virginia and Philadelphia). It was really nice -- my folks decided to build a huge patio in their backyard, and it's great for having kids and family running around, as well as for outdoor brunches. (We haven't had a meal inside since we got here, actually.) This afternoon we drove up to Novato to visit Maj's grandmother Jeannette and her Uncle Kevin and Aunt Robin. Also present were Jeannette's lifelong friend Roseanne and Kevin's highschool pal Jim. Amita June loved running around their big backyard and playing with their sweet old dog Holly. She also got a lot of mileage out of their porch swing. Maj and Robin swapped cooking tips and renovation horror stories, and I got to listen to Jeannette and Roseanne tell gambling stories from various Southern California Indian casinos. Jim, meanwhile, was on his cell phone in another corner of the yard, negotiating with another gold prospector with a hand injury to work the friend's claim. Quite an evening. After a dinner of barbecued salmon, caprese salad, and corn-on-the-cob, Kevin and Robin's neighbors came over, and we talked more about statistical analysis, sheep-farming in Marin County and driving through Austria. A long drive back to my folks', but Amita slept the entire time, thankfully. Good for us all. tags:

Voice jail I had to call Air Canada a few days ago to get our tickets to come out here to California, and I had a terribly frustrating time working my way through their automated systems to get to a human being that I needed to talk to. And I thought to myself, "Why do I hate these automated voice systems so?" I never call a 1-800 number or another voice system if my problem could in any way be handled automatically. I always go to the Web first, and only try to get on the phone if the particular special-purpose request I have hasn't been, or can't be, built into the Web interface. But the economics of call centres makes the company want to shunt me into one or another automated voice systems in hopes that I'll be satisfied and not bother a real human being. My only goal with a phone call is to talk to an intelligent human being who can handle my exceptional situation. But the interface is designed precisely to deny me that goal. Can that interface ever be anything but frustrating? tags:

Least likely to succeed Ross Mayfield posted a nice pic of me offering to run his company in exchange for a hot meal. It's a good shot of me, actually. In other linking issues, my Technorati "Authority" value is now 101, putting me squarely into B-list Bloglebrity territory. Hooray for the second string! tags:

17 May 2007

Gunnar Wolf: When bad system design leads to pain...

A long time ago, I wrote the system that still manages the Cuerpo Acad mico Historia del Presente group in the Universidad Pedag gica Nacional. Yes, I'm happy a good portion of my project, which took me over a year of work... But I must admit a nice deal of shame as well.
Of course, it comes from not properly understanding the domain data and information volume my system would be working with - and coming up with a stupid way to implement searches. I won't get too much in detail because, even if you had access to the full search facility in the system (no, it's not available for the general public), I would not like a swarm of curious people to make last week's events come back... Anyway, the group works by daily filling in tens or hundreds of articles in the system, and having some interesting search sessions every couple of months.
I knew the performance problem was caused by an inefficient searching mechanism (explicitly, category exclusion is the prime killer). I knew loadavg jumped through the roof, memory usage did so as well... But it was not until some weeks ago we installed the mighty Munin on the machines at UPN that we got this jewel - Thanks, Victor, for putting the graphics somewhere they can be shown! ;-)
So... How much does memory usage increase during searches?

Whoa. The system has 640MB real RAM. It has as well 1GB swap. Don't ask me how the hell it reports it was using ~2GB swap - but still... And how is our load average?

Have you ever seen a (single CPU, Pentium 4 1.7GHz) Linux system with a loadavg of 80?! For those who don't know, loadavg gives you the general status on how many jobs are pending scheduling by the CPU. 1 means that all of the CPU's time during a specified timeframe was used (and, on single-core systems, it's the optimal usage level). On this machine, things start getting uncomfortable at 6 or 7. I had never before seen values even half this large.
Sigh... Well, in my defense, I must say I've warned them about this problem for over two years. My contract with them has long passed - I've repeatedly recommended them to hire somebody to fix it. So far, they have not.

15 May 2007

Martin F. Krafft: Death is just the Beginning

I picked up the sampler Death... is just the Beginning Volume IV the other day, practically for free. On it, there are a few songs by bands I've come to like recently, so I expect to find a few more good tunes that way. Opening the case, I notice that it's not the standard jewel case but rather a unique mixture between paper and plastic. But it's not plastic as the case boldly asserts. It's a NaturePac no plastic biodegradable. Well, first off, I am glad that environmental consciousness is spreading. Next, I wonder whether the producers of the sampler expect me to get rid of it soon, or why they chose biodegradable packaging. And last, since we already know that heavy metal is for gifted kids, I can now boldly assert that all listeners of death metal are environmentally conscious. Or was it the other way around? NP: Man on Fire: The Undefined Design

2 January 2007

Clint Adams: Trufflehunter hates Pieces of You

She's an airy ho, I observed. She's made of truffle froth, he deduced. She doesn't look tasty, I observed. Truffle froth is only good when paired with other things, he explained, like Jewel in a three-way.

Next.

Previous.